﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ReviewOrder.aspx.cs" Inherits="UI.ReviewOrder" %>



<%@ Register src="CalenderUserControl.ascx" tagname="CalenderUserControl" tagprefix="uc1" %>
<%@ Register Src="~/CalenderUserControl.ascx" TagPrefix="uc2" TagName="CalenderUserControl" %>




<asp:Content ID="Content1" ContentPlaceHolderID="FeaturedContent" runat="server">
    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    &nbsp;<div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            Review Order
                        </div>
                        <div class="panel-body">
                            <div class="row">
                                <div class="col-lg-6">
                                    <form role="form">
                                       
                                        <div class="form-group">
                                            <label>Location</label>&nbsp;
                                             <select id="ddState" runat="server">
                                                <option></option>

                                            </select>
                                        </div>
                                        <div class="form-group">
                                            
                                                <table>
                                                    <tr>
                                                        <td style="vertical-align:top">
                                                            <label>From</label>
                                                        </td>
                                                        <td style="vertical-align:top">
                                                            <uc1:CalenderUserControl ID="CalenderUserControl1" runat="server" />
                                                        </td>
                                                        <td style="vertical-align:top">
                                                            <label>To</label>
                                                            </td>
                                                        <td style="vertical-align:top">
                                                            <uc2:CalenderUserControl runat="server" ID="CalenderUserControl" />
                                            
                                                        </td>
                                                    </tr>
                                                </table>                                   
                                           
                                                                                    
                                                                                        
                                        </div>
                                        <div class="form-group">
                                            <label>Order Id</label>
                                            <input class="form-control" placeholder="OrderId" id="txtOrderId" runat ="server">
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtOrderId" ErrorMessage="RegularExpressionValidator" ForeColor="Red" ValidationExpression="\d+">Please enter a valid order id</asp:RegularExpressionValidator>
                                            </div>
                                        <div class="form-group">
                                            <label>Order By</label>
                                            <br />
                                           <input class="form-control" placeholder="OrderBy" id="txtOrderBy" runat ="server">
                                            
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtOrderBy" ErrorMessage="RegularExpressionValidator" ForeColor="Red" ValidationExpression="^[A-Za-z]+$">Please enter only alphabets</asp:RegularExpressionValidator>
                                            
                                            </div>   
                                        <div class="form-group">
                                            <asp:GridView ID="GridView1" runat="server" CellPadding="4" ForeColor="#333333" GridLines="Both"  PageSize="1" 
                                                            AllowPaging="True" AutoGenerateColumns="False" OnPageIndexChanging="grdData_PageIndexChanging">
                                                <pagerstyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center"></pagerstyle>
                                                <RowStyle  HorizontalAlign="Center"/>
                                              <Columns>
                                                  <asp:TemplateField>
                                                            <HeaderTemplate>
                                                                <asp:Label ID="lblSalesPersonHeader"
                                                                           runat="server"
                                                                           Text="SalesPerson" />                                   
                                                            </HeaderTemplate>
                                                            <ItemTemplate>
                                                                 <asp:Label ID="lblSalesPerson"
                                                                           runat="server"
                                                                           Text=<%# Eval("AppUserName") %> />     
                                       
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField>
                                                            <HeaderTemplate>
                                                                <asp:Label ID="lblCustomerNameHeader" 
                                                                              runat="server"                                                                               
                                                                              Text="Customer"/>
                                                             </HeaderTemplate>
                                                             <itemtemplate>
                                                                 <asp:Label ID="lblCustomerName"
                                                                           runat="server"
                                                                           Text='<%# Eval("FirstName") +" "+ Eval("LastName") %>' />                                                                   
                                                             </itemtemplate>                   
                                                        </asp:TemplateField>
                                                        
                                                        <asp:TemplateField>
                                                            <HeaderTemplate>
                                                               <asp:Label id="lblAddressHeader"
                                                                          runat="server"
                                                                          Text="Address"/>                        
                                                            </HeaderTemplate>
                                                            <ItemTemplate>
                                                                <asp:Label id="lblAddress"
                                                                          runat="server"
                                                                          Text=<%# Eval("Address") %>/>  
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField>
                                                            <HeaderTemplate>
                                                               <asp:Label id="lblCityHeader"
                                                                          runat="server"
                                                                          Text="State"/>                        
                                                            </HeaderTemplate>
                                                            <ItemTemplate>
                                                                <asp:Label ID="lblCity"
                                                                           runat="server"
                                                                           Text='<%# Eval("City") %>' />
                                                            </ItemTemplate>
                                                        </asp:TemplateField>

                                                         <asp:TemplateField>
                                                            <HeaderTemplate>
                                                               <asp:Label id="lblStateHeader"
                                                                          runat="server"
                                                                          Text="State"/>                        
                                                            </HeaderTemplate>
                                                            <ItemTemplate>
                                                                <asp:Label ID="lblState"
                                                                           runat="server"
                                                                           Text='<%# Eval("State") %>' />
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField>
                                                            <HeaderTemplate>
                                                               <asp:Label id="lblZipHeader"
                                                                          runat="server"
                                                                          Text="Zip"/>                        
                                                            </HeaderTemplate>
                                                            <ItemTemplate>
                                                                <asp:Label ID="lblZip"
                                                                           runat="server"
                                                                           Text='<%# Eval("Zip") %>' />
                                                            </ItemTemplate>
                                                        </asp:TemplateField>                                                                                                       
                                                             <asp:TemplateField>
                                                                    <HeaderTemplate>
                                                                        <asp:Label id="lblOrderDateHeader"
                                                                                    runat="server"
                                                                                    Text="Ord. Date"/>                        
                                                                    </HeaderTemplate>
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblOrderDate"
                                                                                    runat="server"
                                                                                    Text='<%# Eval("OrderDate") %>' />
                                                                    </ItemTemplate>
                                                             </asp:TemplateField>
                                                             <asp:TemplateField>
                                                                    <HeaderTemplate>
                                                                        <asp:Label id="lblReferenceDateHeader"
                                                                                    runat="server"
                                                                                    Text="Ref. Date"/>                        
                                                                    </HeaderTemplate>
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblReferenceDate"
                                                                                    runat="server"
                                                                                    Text='<%# Eval("ReferenceDate") %>' />
                                                                    </ItemTemplate>
                                                             </asp:TemplateField>
                                                             
                                                             <asp:TemplateField>
                                                                    <HeaderTemplate>
                                                                       <asp:Label id="lblNoteToOfficeHeader"
                                                                                  runat="server"
                                                                                  Text="Notes"/>                        
                                                                    </HeaderTemplate>
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblNoteToOffice"
                                                                                   runat="server"
                                                                                   Text='<%# Eval("NotesToOffice") %>' />
                                                                    </ItemTemplate>
                                                            </asp:TemplateField> 
                                                            <asp:TemplateField>
                                                                    <HeaderTemplate>
                                                                       <asp:Label id="lblOrderIdHeader"
                                                                                  runat="server"
                                                                                  Text="Ord. Id"/>                        
                                                                    </HeaderTemplate>
                                                                    <ItemTemplate>
                                                                        <asp:Label ID="lblOrderId"
                                                                                   runat="server"
                                                                                   Text='<%# Eval("OrderId") %>' />
                                                                    </ItemTemplate>
                                                            </asp:TemplateField>
                                                            

                                                    </Columns>
                                            </asp:GridView>
                                        </div>        
                                        <asp:Button ID="btnGo" runat="server" Text="Go" OnClick="btnGo_Click" CssClass ="btn btn-default" />   
                                    </form>
                                </div>
                               
                            </div>
                           
                        </div>
                        
                    </div>
                   
                </div>
                
            </div>
</asp:Content>
